#include "types/common.h"
#include "types/hash.h"

#ifndef _buffer_info_h_
#define _buffer_info_h_

struct BufferKey
{
	string tablename;
	UINT32 block_num;
};

struct BufferInfo
{
	UINT32 bp_index;
	bool isdirty;
};

class BufferInfoTraits
{
	public:
		inline UINT32 get_hash(BufferKey k)
		{
			return 0;
		}
		
		inline bool isequal(BufferKey k1, BufferKey k2)
		{
			return (k1.tablename == k2.tablename) && (k1.block_num == k2.block_num);
		}
};

typedef HashMap<BufferKey, BufferInfo, BufferInfoTraits> BufferInfoTbl;

#endif